package com.jboost.modules.app.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class BaseResult<T> {
    Boolean success;
    String desc;
    T t;
    public static BaseResult success(){
        return new BaseResult(true,null,null);
    }
    public static BaseResult success(Object object){
        return new BaseResult(true,null,object);
    }

    public static BaseResult success(Object object,String desc){
        return new BaseResult(true,desc,object);
    }
    public static BaseResult fail(){
        return new BaseResult(false,null,null);
    }
    public static BaseResult fail(Object object){
        return new BaseResult(false,null,object);
    }

    public static BaseResult fail(Object object,String desc){
        return new BaseResult(false,desc,object);
    }


}
